<?php
class Pexi_Engine
{
    static public function execute($message)
    {
        $client = new Zend_Http_Client('http://localhost/peXi/htdocs/receiver.php');
        $client->setMethod(Zend_Http_Client::POST);

        // Send message to receiver
        $client->setParameterPost(array(
            'id' => $message['id'],
            'message' => $message['message']
        ));
        $responseCode = $client->request()->getStatus();

        return (int) $responseCode;
    }
}